<template>
    <!--商品详细参数页-->
    <div class="tip">
        <!--头部导航-->
        <mt-header fixed title="商品详细参数">
            <router-link v-bind="{to:'/shop/shopifo/' + this.id }" slot="left">
                <mt-button icon="back">返回</mt-button>
            </router-link>
            <mt-button icon="more" slot="right"></mt-button>
        </mt-header>
        <div v-for="(x,index) in list" :key="index" class="desc">
            <h3 v-html="x.title"></h3>
            <p class="line"></p>
            <p v-html="x.content" class="content"></p>
        </div>
    </div>
</template>

<script>
    import apidoma from "../../kits/common.js";//导入公共域名
    export default{
        data(){
            return {
                id: '',
                list: []
            }
        },
        created(){
            this.id = this.$route.params.val;
            this.getshopCont();
        },
        methods: {
            getshopCont(){//获取商品参数信息
                // :id
                //确定url地址
                const url = apidoma.picdoName + "/api/goods/getdesc/" + this.id;
                this.$http.get(url).then(function(response){
                    this.list = response.body.message;
                });
            },
        }
    }
</script>

<style scoped>
    .desc {
        padding: 5px;
    }
    .desc h3 {
        font-size: 16px;
        color: blue;
    }
    .line {
        height: 1px;
        border: 1px solid rgba(0,0,0,0.3);
    }
    .content img {
        width: 100%;
    }
</style>

